$(function () {
    setUsername();
});

function setUsername() {
    let username = sessionStorage.getItem("username");
    console.log(username);
    if (username != null) {
        $("#loginName").html(username);
    } else {
        // window.open("/html/login.html",'_self');
        window.location.href = "/html/login.html";
    }

}

function loadHref(obj, page) {

    // $(obj).children().css("display", "block");
    $(obj).siblings().children().css("display", "none");
    $(obj).siblings().css({"background-color": "slateblue"});
    $(obj).children().css({"background-color": "lightblue", "margin": "2px 0", "display": "block"});
    // judgeUsernameLogin();
    $(".right").load("/html/back" + page);

}
